const { defineConfig } = require('@vue/cli-service')
const path = require('path')
module.exports = defineConfig({
  transpileDependencies: true,
  productionSourceMap:false,
  pages:{
    index:{
      entry:"examples/main.js",
      template:"public/index.html",
      filename:"index.html"
    }
  },
  chainWebpack: config=>{
    config.resolve.alias
    .set('@', path.resolve('examples'))
    .set('~', path.resolve('package'))

  config.module
    .rule('js')
    .include
      .add(/package/)
      .end().include.add(/examples/)
      .end()
    .use('babel')
      .loader('babel-loader')
      .tap(options => {
        // 修改它的选项...
        return options
      })

  },
  css: {// 不单独打出css文件
    extract:false
  }
})
